<template>
  <!-- // 东航 MU5316
// 20:30
// 白云机场 T1
// 2小时20分
// 22:50
// 虹桥机场 T2
// ￥810起 -->
  <div class="flights_item">
    <div class="flights_item_title" @click="show=!show">
        <span class="flights_item_time">2小时20分</span>
      <div class="flights_item_inner flights_item_name">
        {{flightsitem.airline_name}}
        {{flightsitem.flight_no}}
      </div>
      <div class="flights_item_inner flights_item_airport">
        <div class="flights_item_airport_row1">{{flightsitem.dep_time}}</div>
        <div class="flights_item_airport_row2">{{flightsitem.org_airport_name}} {{flightsitem.org_airport_quay}} </div>
      </div>
      <div class="flights_item_inner flights_item_airport">
         <div class="flights_item_airport_row1">{{flightsitem.arr_time}}</div>
        <div class="flights_item_airport_row2">{{flightsitem.dst_airport_name}} {{flightsitem.dst_airport_quay}}</div>
      </div>
      <div class="flights_item_inner flights_item_price">
        <div>￥ <span>{{flightsitem.base_price}}</span> 起</div>
      </div>
    </div>

    <div class="flights_item_content"  v-show="show">

      <span class="low_price" >低价推荐</span>

      <div 
      v-for="item in flightsitem.seat_infos"
      :key="item.index"
      class="flights_item_content_row">
        <div class="flights_item_content_col1">
          <span>{{item.group_name}}</span> | {{item.supplierName}}
        </div>
        <div class="flights_item_content_col2">￥{{item.org_settle_price}}</div>
        <div class="flights_item_content_col3">
          <el-button
            type="warning"
          >选定</el-button>
          <span>剩余:{{item.discount}}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    props: ["flightsitem"],
     data() {
    return {
      show: false
    }
  },
};
</script>

<style lang="less" scoped  >
.flights_item {
//   background-color: aqua;
  border: 1px solid #ccc;
  margin-bottom: 15px;
  .flights_item_title {
    display: flex;
    height: 75px;
     position: relative;
    .flights_item_time {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 13px;
      color: #666;
      padding-bottom: 15px;
      border-bottom: 1px solid #ccc;
    }
    .flights_item_inner{
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    .flights_item_inner.flights_item_name {
      font-size: 14px;
    }

    .flights_item_inner.flights_item_airport {
      .flights_item_airport_row1 {
        font-size: 22px;
      }

      .flights_item_airport_row2 {
        font-size: 12px;
        color:#666;
      }
    }

    .flights_item_inner.flights_item_price {
       font-size: 16px;
      span {
        font-size: 20px;
        color:#e6a23c;
      }
    }
  }

  .flights_item_content {
    background-color: #f6f6f6;
    padding-left: 140px;
    position: relative;
    .low_price{
      position: absolute;
      top:50%;
      transform: translateY(-50%);
      left:20px;
      font-size: 14px;
      color:#000;
    }
    .flights_item_content_row {
      border-bottom: 1px solid #ccc;
      height: 70px;
      display: flex;
      align-items: center;
      &:last-child{
        border-bottom:   none;
      }
      .flights_item_content_col1 {
        font-size: 12px;
        flex: 4;
        span {
          color: green;
        }
      }

      .flights_item_content_col2 {
        flex: 1;
        color: #e6a23c;
        font-size: 18px;
      }

      .flights_item_content_col3 {
        height: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        text-align: center;
        padding-right: 15px;
        span {
          font-size: 12px;
          color: #666;
        }
      }
    }
  }
}
</style>